package com.qing.shardingjdbc.mapper;


import com.qing.shardingjdbc.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserMapper {

    @Insert("insert into user_info(name,password,age,address) values(#{name},#{password},#{age},#{address})")
    void addUser(User user);

    @Select("select * from user_info")
    List<User> findUsers();
}
